import { getBackgroundSetting, getGeneralSetting } from '@/api/AccountSettingApi.ts'
import { useBackgroundSettingStore } from '@/config/store/UseBackgroundSettingStore.ts'
import { useGeneralSettingStore } from '@/config/store/UseGeneralSettingStore.ts'


export class AccountSettingService {

    public getBackgroundSetting() {
        const settingStore = useBackgroundSettingStore()
        getBackgroundSetting()
                .then(setting => {
                    if (setting) {
                        settingStore.setting = setting
                    }
                })
    }

    public getGeneralSetting() {
        const settingStore = useGeneralSettingStore()
        getGeneralSetting()
                .then(setting => {
                    if (setting) {
                        settingStore.setting = setting
                    }
                })
    }

}
